<template>
  <div class="auto">
    <criteria-paged :model="model" v-ref:paged>
      <criteria partial='criteria' @condition-changed='search' v-ref:cri>
        <div novalidate class="form-inline" partial>

          <div class="form-group">
            <datepicker
              :value.sync="model.f_start_date"
              placeholder='开始时间'
              :disabled-days-of-week="[]"
              :format="'yyyy-MM-dd HH:mm:ss'"
              :show-rest-button="reset"
              v-model="model.f_start_date"
              condition="f_check_date >= '{}'">
            </datepicker>
          </div>
          <div class="form-group">
            <datepicker
              :value.sync="model.f_end_date"
              placeholder='结束时间'
              :disabled-days-of-week="[]"
              :format="'yyyy-MM-dd HH:mm:ss'"
              :show-rest-button="reset"
              v-model="model.f_end_date"
              condition="f_check_date <= '{}'">
            </datepicker>
          </div>
          <div class="form-group">
            <v-select id="f_usertype"
              v-model="model.f_usertype"
              placeholder='用户类型'
              :value.sync="model.f_usertype"
              :options='$parent.$parent.usertype'
              condition="f_usertype = '{}'"
              close-on-select>
            </v-select>
          </div>
          <div class="form-group">
            <button class="btn btn-success width-80" @click="search()" v-el:cx>查询</button>
          </div>
        </div>
       </criteria>
      <data-grid :model="model" partial='list' v-ref:grid>
        <template partial='head'>
          <tr>
             <th>序号</th>
             <th>人员姓名</th>
			       <th>民用数量</th>
             <th>非民用数量</th>
             <th>合计数量</th>
          </tr>
        </template>
        <template partial='body'>
          <td style="text-align: center;">{{$index+1}}</td>
          <td style="text-align: center;">{{row.f_checker}}</td>
          <td style="text-align: center;">{{row.f_minyong}}</td>
          <td style="text-align: center;">{{row.f_feiminyong}}</td>
          <td style="text-align: center;">{{row.f_heji}}</td>
        </template>
      </data-grid>
 </criteria-paged>
  </div>
</template>

<script>
import co from 'co'
import { PagedList } from 'vue-client'
import * as Util from '../Util'

export default {
  title: '用户意见',
  data () {
    return {
        model: new PagedList('rs/sql/checkplantj', 20, {}),
        usertype: [  {label: '民用', value: '民用'},
                  {label: '非民用', value: '非民用'}]
    }
  },
  props: [''],
  ready () {

  },
  methods: {
    search () {
      this.$refs.paged.$refs.cri.search()
    },
  }
}
</script>
<style media="screen">
  .divtext {
    min-width: 50px;
    max-width: 200px;
    border: 1px solid green;
    display: inline-block;
  }
</style>
